// 2013-9-26下午02:34:43  net.betou.trade.share.OpenTradeTemplate.java

package net.betou.trade.share;

import net.betou.common.page.Pagination;
import net.betou.trade.entity.main.AgentAndAdmins;
import net.betou.trade.main.manager.UserGroupMng;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.ui.ModelMap;

/**
 * 
 * @author 叶装装
 */
@Component
public class OpenTradeTemplate extends TemplateAbstract{

	public void setPage( ModelMap model, AgentAndAdmins admin, Integer pageSize, Integer pageNo, String searchProperty, String searchValue, String orderProperty, String orderDirection, String filterStatus ) {
		
		Pagination pagination = mng.getOpenTradePage( admin, searchProperty, searchValue, orderProperty, orderDirection, pageNo, pageSize, filterStatus );
		paramToModel( model, pagination, null, pageSize, searchProperty, searchValue, orderProperty, orderDirection, filterStatus );
		model.addAttribute( "groupList", groupMng.getAllowReadList( null, null, null, null ) );
	}

	@Autowired
	protected UserGroupMng groupMng;
}
